package cc.cary.warehouse.common;

/**
 * 错误码
 *
 * @author Cary
 * @date 2023/1/16
 */
public class ErrorConstants {

    //========================= 全局错误码 =============================

    public static final int SUCCESS = 0x00000000;

    public static final int TOKEN_IS_NULL = 0x00000001;

    public static final int TOKEN_CHECK_FAILED = 0x00000002;

    public static final int ERR_UNKNOWN = 0xffffffff;

    /**
     * 业务错误
     */
    public static final int BUSINESS_ERROR = -1;


    //========================= 模块错误码 ===============================
    //                   模块定义从0x00001000开始

    /**
     * 用户模块
     */
    private static final int USER_BASE_ERROR_SEGMENT = 0x00001000;

    //========================= 用户模块 =================================

    /**
     * 用户不存在
     */
    public static final int USER_IS_NOT_EXISTS = USER_BASE_ERROR_SEGMENT | 1;


    /**
     * 密码错误
     */
    public static final int PASSWORD_IS_ERROR = USER_BASE_ERROR_SEGMENT | 2;

}
